package com.warmheart.service.sys;

import java.util.List;

import com.warmheart.base.model.EntityModel;
import com.warmheart.base.service.IBaseService;
import com.warmheart.core.enums.PlatEnum;
import com.warmheart.entity.sys.SysConfig;
import com.warmheart.model.ConfigModel;

/**
 * 
 * @ClassName: ISysConfigService
 * @Description: 参数配置IService，对应表名称为tb_sys_config
 *               温馨提示：对外提供的接口，原则上这里只写自定义方法
 * @author ZhangJianyang
 * @date 2025-06-16 09:37:02
 *
 */
public interface ISysConfigService extends IBaseService<SysConfig> {

    public String getString(PlatEnum.SysConfigEnum key);

    public <E> E getModel(PlatEnum.SysConfigEnum key, Class<E> cls);

    public void setString(PlatEnum.SysConfigEnum key, String value, EntityModel... entityModels) throws Exception;

    public <E> void setModel(PlatEnum.SysConfigEnum key, E value, EntityModel... entityModels) throws Exception;

    /**
     * 
     * @Title: getConfigForCaches
     * @Description: 获取所有的配置值，用于缓存
     * @author ZhangJianyang
     * @return
     */
    public List<ConfigModel> getConfigForCaches();

}
